home *** CD-ROM | disk | FTP | other *** search
- 10 rem copyright 1992 - compute publications intl ltd - all rights reserved
- 20 :
- 30 :
- 40 sa = 32000
- 50 if peek(776)=32 and peek(777)=131 then90
- 60 f$ = "mob master":gosub2210
- 70 f$ = "sprites":gosub2210
- 80 poke sa+1528,96: sys sa: poke sa+1528,169
- 90 bd= 53280:ba= 53281:cc= 646:xr= 781:yr= 782:pl= 58636:ms= 13568
- 100 se= sa+1329:ag= 32/45
- 110 poke 650,128:print chr$(14) chr$(8)"[154][147]"
- 120 poke bd,6:poke ba,6:/zap:/split 0
- 130 gosub1960:gosub1990
- 140 y=4:d=192:s=62:poke cc,15:m$="[175][175][175][175][175][175][175][175][175][175][175][175][175][175]":gosub1760
- 150 poke cc,12:poke 199,1:m$=" [205][207][194] [205][193][211][212][197][210] ":gosub1760
- 160 poke cc,11:poke 199,0:m$="[183][183][183][183][183][183][183][183][183][183][183][183][183][183]":gosub1760
- 170 y=y+1:poke cc,7:m$="[195]opyright 1992 [195][207][205][208][213][212][197] [208]ubls [201]ntl [204]td":gosub1760
- 180 y=y+1:poke cc,1:m$=" [215]elcome to [205][207][194] [205]aster, the versatile":gosub1810
- 190 m$="and powerful sprite controller for your":gosub1810
- 200 m$="[195]ommodore 64! [205][207][194] [205]aster adds 10 new":gosub1810
- 210 m$="[194][193][211][201][195] commands for easier sprite":gosub1810
- 220 m$="definition, positioning, movement,":gosub1810
- 230 m$="animation, and other miscellaneous":gosub1810
- 240 m$="functions. [217]ou can even do all of this":gosub1810
- 250 m$="without a single poke statement!":gosub1810
- 260 y=y+1:poke cc,14:m$="[208][204][197][193][211][197] [208][210][197][211][211] [193] [203][197][217] [212][207] [195][207][206][212][201][206][213][197]":gosub1760
- 270 poke 198,0
- 280 get a$:if a$<>"" then300
- 290 gosub1920:goto280
- 300 poke ba,0:poke bd,0:/zap
- 310 print"[147] [212]he '[211][208][210][201][212][197]' command defines most"
- 320 print"of the characteristics of a sprite."
- 330 print"[215]ith the '[211][208][210][201][212][197]' command, you can do"
- 340 print"the following to a sprite:"
- 350 dl=2000:gosub2130
- 360 print:print"[155] * turn it on or off"
- 370 /sprite 0,1,1,0,0,0:/animate 0,255,0,202
- 380 /movspr 0,160,140
- 390 dl=500:fori=1to5
- 400 /sprite 0,1:gosub2130
- 410 /sprite 0,0:gosub2130
- 420 next
- 430 /sprite 0,1
- 440 print:print" * set its foreground color"
- 450 print" (16 different colors in total)"
- 460 fori=0to15
- 470 /sprite 0,*,i:forz=1to200:next
- 480 next:/sprite 0,*,1
- 490 print:print" * set its priority to the background"
- 500 m$="[219][219][219][219][219]":gosub2100
- 510 fori=1to5
- 520 /sprite 0,*,*,1:gosub2130
- 530 /sprite 0,*,*,0:gosub2130
- 540 next:m$=" ":gosub2100
- 550 print"[155] * expand it to twice its original size"
- 560 print" horizontally, vertically, or both"
- 570 /sprite 0,*,*,*,1:dl=1000:gosub2130
- 580 /sprite 0,*,*,*,0,1:gosub2130
- 590 /sprite 0,*,*,*,1,1:gosub2130
- 600 /sprite 0,*,*,*,0,0
- 610 print:print" * the sprite can display up to 3"
- 620 print" different colors at a time by turning";
- 630 print" on multicolor mode."
- 640 fori=1to5
- 650 /animate 0,*,*,203:/sprcolor 10,6:/sprite 0,*,*,*,*,*,1:gosub2130
- 660 /animate 0,*,*,202:/sprite 0,*,*,*,*,*,0:gosub2130
- 670 next
- 680 print:print"[217]ou can define and use up to eight"
- 690 print"sprites at a time.[158]"
- 700 z=1:fori=0to7
- 710 ifz=1thenz=0:/animate i,*,*,202:goto730
- 720 z=1:/animate i,*,*,203
- 730 /sprite i,1,i+1,0,0,0,z:next
- 740 z=0:fori=0to320step38
- 750 /movspr z,i,140:z=z+1:next
- 760 y=24:gosub2140
- 770 /zap:print"[147] [211]prite animation is easy with [205][207][194]"
- 780 print"[205]aster. [212]he '[193][206][201][205][193][212][197]' command takes"
- 790 print"care of animation in [194][193][211][201][195]."
- 800 /sprite 0,1,1,0,0,0,1:/sprcolor 2,6:/animate 0,4,0,204,207
- 810 /movspr 0,160,148:dl= 2000:gosub2130
- 820 print:print"[155] [212]he animation speed can be changed"
- 830 print"for faster or slower animation. [212]he"
- 840 print"sprite can animate very fast[155]...";
- 850 /animate 0,0:dl=5000:gosub2130
- 860 print"[157][157][157] or very":print"slowly[155]."
- 870 /animate 0,64:dl=5000:gosub2130
- 880 print:print" [212]he sprite can be animated always"
- 890 print"or just once.[158]":/animate 0,*,1
- 900 y=12:gosub2140
- 910 /zap:poke ba,6:pokebd,6:y=9:x=0:gosub2090
- 920 print" [217]ou can place the sprite anywhere"
- 930 print"on the screen by using the '[159][205][207][214][211][208][210]'"
- 940 print"command. [217]ou can also move the sprite"
- 950 print"using the same command. [194]est of all,"
- 960 print"the sprites continue to move and"
- 970 print"animate while your program does"
- 980 print"something else![154]"
- 990 dl=1000:gosub2130
- 1000 /sprcolor 0,7
- 1010 y=54:fori=0to7:c=i:if i=6 thenc=15
- 1020 /sprite i,1,c,0,0,0,1:/animate i,4,0,208,210:/boundary i,0,0,255,0,344
- 1030 /movspr i,0,y:y=y+25:next
- 1040 fori=0to7:/movspr i,64#63-i:next
- 1050 y=17:gosub2140
- 1060 /zap:poke bd,0:poke ba,0
- 1070 x=0:y=6:gosub2090
- 1080 /sprcolor 9,0:/sprite 0,1,1,0,0,0,1:/animate 0,4,0,204,207
- 1090 /boundary 0,3,1,254,1,344
- 1100 print" [212]he direction of the sprite can also"
- 1110 print"be determined by the '[205][207][214][211][208][210]' command."
- 1120 x=0:y=9:gosub2090
- 1130 /movspr 0,160,148:/movspr 0,*#255:/sprite 0,1
- 1140 print"[155][197]nter the direction of the sprite in"
- 1150 print"degrees; enter [158]-1[155] to go on";:inputa
- 1160 ifa<0then1210
- 1170 a=a*ag:ifa>360then1120
- 1180 /movspr 0,a#64
- 1190 if peek(se)and1 then1190
- 1200 goto1120
- 1210 print"[147]":y=3:x=0:gosub2090:poke bd,11:/sprcolor 9
- 1220 print" [197]ach sprite has its own individual"
- 1230 print"boundary. [217]ou can use the '[194][207][213][206][196][193][210][217]'"
- 1240 print"command to define the sprite's boundary"
- 1250 print"and its action at a boundary."
- 1260 print:print"[155] [193]t the boundary, the sprite will do"
- 1270 print"one of the following action:"
- 1280 dl=3000:gosub2130
- 1290 print:print" * wrap around"
- 1300 b=0:x1=0:x2=250:x3=0:x4=344:gosub2170
- 1310 print:print" * bounce off the boundary"
- 1320 b=1:x1=46:x2=231:x3=24:x4=320:gosub2170
- 1330 print:print" * stop at the boundary"
- 1340 b=2:gosub2170
- 1350 print:print" * disable at the boundary"
- 1360 b=3:gosub2170
- 1370 y=19:gosub2140
- 1380 /zap:x=0:y=10:gosub2090
- 1390 poke 16383,0:poke bd,6:poke ba,6:poke 53265,11
- 1400 print" [217]ou can even display sprites on the"
- 1410 print"top and bottom border! [212]he '[159][211][208][204][201][212]'"
- 1420 print"command lets you choose between the two"
- 1430 print"split-screen modes.[154]"
- 1440 /irq 0:fori=0to3:/sprite i,1,7,0,0,0,1:/boundary i,0,0,250,0,344:next
- 1460 /animate 0,4,0,192,193:/animate 1,0,0,194,195:/sprcolor 0,1
- 1470 /movspr 0,0,38:/movspr 1,24,38
- 1480 /animate 2,0,0,198,199:/animate 3,4,0,196,197
- 1490 /movspr 2,320,242:/movspr 3,344,242
- 1500 fori=4to7:/sprite i,1,15,0,0,0,1:/boundary i,0,0,250,0,344:next
- 1510 /animate 4,0,255,200:/animate 5,0,255,201
- 1520 /animate 6,0,255,200:/animate 7,0,255,201
- 1530 /movspr 4,0,35:/movspr 5,24,35:/movspr 6,0,245:/movspr 7,24,245
- 1540 /movspr 4,64#64:/movspr 5,64#64:/movspr 6,64#63:/movspr 7,64#63
- 1550 /movspr 0,64#63:/movspr 1,64#63
- 1560 /movspr 3,192#63:/movspr 2,192#63
- 1570 /irq 1:/split1:poke 53265,27
- 1580 dl=2000:gosub2130:y=15:gosub2140
- 1590 /zap:/split0:poke 53265,27
- 1600 gosub1960:gosub1990
- 1610 y=8:d=192:s=62:poke cc,1
- 1620 m$=" [193]s you can see, there are endless":gosub1810
- 1630 m$="uses for [205][207][194] [205]aster. [217]ou can use [205][207][194]":gosub1810
- 1640 m$="[205]aster to write a good quality arcade":gosub1810
- 1650 m$="game in either [194][193][211][201][195] or machine":gosub1810
- 1660 m$="language. [215]ith [205][207][194] [205]aster, only your":gosub1810
- 1670 m$="immagination is the limit!":gosub1810
- 1680 y=y+1:poke cc,3:m$="[208]ress the [211][208][193][195][197] [194][193][210] to restart this":gosub1760
- 1690 m$="demo; press any other key to quit.":gosub1760
- 1700 poke 198,0
- 1710 get a$:if a$=" "then run
- 1720 if a$<>"" then1740
- 1730 gosub1920:goto1710
- 1740 /zap:/split:sys 65409:end
- 1750 ---- subroutines ----
- 1760 gosub1820
- 1770 zz=len(m$):z=40-zz:l=z/2:r=l+zz
- 1780 /irq 0:/movspr 0,d#s:/movspr 1,d#s:/irq 1
- 1790 sys ms,m$,y,l,r,e:y=y+1:return
- 1800 ----
- 1810 gosub1820:l=0:r=len(m$):goto1780
- 1820 z=y*8+42
- 1830 if d=192 then1870
- 1840 d=192:e=2:gosub1910
- 1850 /movspr 0,368,z:/movspr 1,344,z
- 1860 /animate 0,4,0,196,197:/animate 1,0,0,198,199:goto1900
- 1870 d=64 :e=43:gosub1910
- 1880 /movspr 0,0,z:/movspr 1,24,z
- 1890 /animate 0,4,0,192,193:/animate 1,0,0,194,195
- 1900 /sprite 0,1:/sprite 1,1:return
- 1910 /movspr 0,d#255:/movspr 1,d#255:return
- 1920 if peek(se)and3 then return
- 1930 z=int(rnd(0)*180)+50:gosub1830
- 1940 /irq 0:/movspr 0,d#s:/movspr 1,d#s:/irq 1:return
- 1950 ---- define plane ----
- 1960 /sprite 0,1,7,0,0,0,1:/sprite 1,1,7,0,0,0,1:/sprcolor 0,1
- 1970 /boundary 0,3,*,*,4,392:/boundary 1,3,*,*,4,392:return
- 1980 ---- define clouds ----
- 1990 /irq 0:fori=2to7:/sprite i,1,12,1,0,0,1:next
- 2000 /animate 2,255,*,200,200:/animate 3,255,*,201,201
- 2010 /animate 4,255,*,200,200:/animate 5,255,*,201,201
- 2020 /animate 6,255,*,200,200:/animate 7,255,*,201,201
- 2030 fori=2to7:/boundary i,0,*,*,0,400:next
- 2040 /movspr 2,0,120:/movspr 3,24,120:/movspr 2,64#63:/movspr 3,64#63
- 2050 /movspr 4,0,154:/movspr 5,24,154:/movspr 4,64#65:/movspr 5,64#65
- 2060 /movspr 6,0,160:/movspr 7,24,160:/movspr 6,64#64:/movspr 7,64#64
- 2070 /irq 1:return
- 2080 ---- plot cursor ---
- 2090 poke 781,y:poke 782,x:sys 58636:return
- 2100 print"[151]":fori=0to2
- 2110 y=11+i:x=16:gosub2090
- 2120 printm$:next:return
- 2130 forzz=1todl:next:return
- 2140 poke 198,0:x=4:gosub2090:print"[208]lease press a key to continue";
- 2150 get a$:ifa$="" then2150
- 2160 print"[147]";:return
- 2170 dl= 500:gosub 2130
- 2180 fori=0to7:/sprite i,1,i+1,0,0,0,1:/boundary i,b,x1,x2,x3,x4
- 2181 /animate i,4,0,204,207:/movspr i,*#255:/movspr i,160,148:next
- 2190 fori=0to7:x=int(rnd(1)*256):/movspr i,x#64-i:forz=1to100:next:next
- 2195 get a$:if a$=""then 2195
- 2196 fori=0to7:/movspr i,*#255:/movspr i,160,148:next:return
- 2200 /movspr 0,*#255:/movspr 0,160,148:return
- 2210 sys 57943 f$:poke 185,255:poke 780,0:sys 65493:return
-